package org.nanhill.support.jmx.simplebean;

/*
 * @(#)file      BaseAgent.java
 * @(#)author    Sun Microsystems, Inc.
 * @(#)version   1.13
 * @(#)lastedit      03/07/15
 *
 * Copyright 2000-2003 Sun Microsystems, Inc.  All rights reserved.
 * This software is the proprietary information of Sun Microsystems, Inc.
 * Use is subject to license terms.
 * 
 * Copyright 2000-2003 Sun Microsystems, Inc.  Tous droits r�serv�s.
 * Ce logiciel est propriet� de Sun Microsystems, Inc.
 * Distribu� par des licences qui en restreignent l'utilisation. 
 */

// java imports
//
import javax.management.MBeanServer;
import javax.management.MBeanServerFactory;
import javax.management.ObjectName;

import com.sun.jdmk.comm.HtmlAdaptorServer;

public class BaseAgent {

	/*
	 * ------------------------------------------ CONSTRUCTORS
	 * ------------------------------------------
	 */

	public BaseAgent() {

	}

	/*
	 * ------------------------------------------ PUBLIC METHODS
	 * ------------------------------------------
	 */

	public static void main(String[] args) {
		// CREATE the MBeanServer
		MBeanServer server = MBeanServerFactory.createMBeanServer();
		// create, register and start a new html adaptor
		HtmlAdaptorServer html = new HtmlAdaptorServer();
		ObjectName html_name = null;
		try {
			html_name = new ObjectName("Adaptor:name=html,port=8082");
			server.registerMBean(html, html_name);
		} catch (Exception e) {
			e.printStackTrace();
			return;
		}
		html.start();
	}

}
